package demo.axitdn.model;

import demo.axitdn.physic.CircularMotion;
import demo.axitdn.physic.Force;
import demo.axitdn.physic.ZeroForce;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;

public class DemoModel extends Model {
	private float radius;
	private Force motion;
	public DemoModel(float x0,float y0,float v0,float angle,double t,float radius) {
		super();
		this.radius=radius;
		state.position.x=x0;
		state.position.y=y0;
		state.velocity.x= (float) (v0 * Math.cos(angle));
		state.velocity.y= (float) (v0 * Math.sin(angle));
		motion=new ZeroForce();
		this.setForce(motion);
	}
	@Override
	public void onDraw(Canvas c) {
		// TODO Auto-generated method stub
		Paint p=new Paint();
		p.setColor(Color.RED);
		int x=(int)(state.position.x*30);
        int y=(int)(state.position.y*30);
		c.drawCircle(x, y, radius, p);		
	}
	@Override
	public void onUpdate(double t) {
		// TODO Auto-generated method stub
		//motion.decrease(t,-0.1f,0.0f);
	}

}
